package com.caius.xiaohashu.user.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @author Caius
 * @description
 * @since Created in 2025-05-17
 */
@Getter
@AllArgsConstructor
public enum SexEnum {
    WOMAN(0),
    MAN(1);

   private final Integer value;

    /**
     * 性别类型判空
     * @param value
     * @return
     */
   public static boolean isValid(Integer value) {
       for (SexEnum loginTypeEnum : SexEnum.values()) {
           if (Objects.equals(value, loginTypeEnum.getValue())) {
               return true;
           }
       }
       return false;
   }
}
